.@{table-prefix-cls} {
  position: relative;
  &-header {
    margin-bottom: 0 !important;
    overflow: hidden !important;
    font-size: 14px;
    border: 1px solid #dddddd;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom: 0;
    background-color: #efefef;
    // background: -webkit-linear-gradient(top, #f9f9f9 0, #efefef 100%);
    // background: -moz-linear-gradient(top, #f9f9f9 0, #efefef 100%);
    // background: -o-linear-gradient(top, #f9f9f9 0, #efefef 100%);
    // background: linear-gradient(to bottom, #f9f9f9 0, #efefef 100%);
    // background-repeat: repeat-x;
    overflow: hidden;

    th {
      position: relative;
      height: @grid-header-height;
      padding: 0 5px;
      font-weight: normal;
      // border:none !important;
      color: inherit !important;
      // text-align:center;
      background: none !important;

      .@{table-prefix-cls}-column-sorter {
        display: table-cell;
        vertical-align: middle;

        .@{table-prefix-cls}-column-sorter-inner {
          height: 1em;
          margin-top: 0.35em;
          margin-left: 0.57142857em;
          color: #bfbfbf;
          line-height: 1em;
          text-align: center;
          transition: all 0.3s;

          .@{table-prefix-cls}-column-sorter-up,
          .@{table-prefix-cls}-column-sorter-down {
            .iconfont-size-under-12px(11px);

            display: block;
            height: 1em;
            line-height: 1em;
            transition: all 0.3s;

            &.on {
              color: @primary-color;
            }
          }

          &-full {
            margin-top: -0.15em;

            .@{table-prefix-cls}-column-sorter-up,
            .@{table-prefix-cls}-column-sorter-down {
              height: 0.5em;
              line-height: 0.5em;
            }

            .@{table-prefix-cls}-column-sorter-down {
              margin-top: 0.125em;
            }
          }
        }
      }

      &.@{table-prefix-cls}-column-has-actions {
        position: relative;
        background-clip: padding-box;

        &.@{table-prefix-cls}-column-has-sorters {
          cursor: pointer;

          &:hover {
          }

          &:active {
            .@{table-prefix-cls}-column-sorter-up:not(.on),
            .@{table-prefix-cls}-column-sorter-down:not(.on) {
              color: @text-color-secondary;
            }
          }
        }
      }

      .@{table-prefix-cls}-header-column {
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: top;

        .@{table-prefix-cls}-column-sorters {
          display: table;

          > .@{table-prefix-cls}-column-title {
            display: table-cell;
            vertical-align: middle;
          }

          > *:not(.@{table-prefix-cls}-column-sorter) {
            position: relative;
          }

          &::before {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: transparent;
            transition: all 0.3s;
            content: '';
          }

          &:hover::before {
            background: rgba(0, 0, 0, 0.04);
          }
        }
      }

      &.@{table-prefix-cls}-column-has-sorters {
        user-select: none;
      }
    }

    .@{table-prefix-cls}-inner {
      float: left;
      padding-right: 20px;
    }
  }
  &-body {
    min-height: 210px;
    border: 1px solid #dbdbdb;
    background-color: #ffffff;
    overflow: auto !important;
    td {
      padding: 8px 5px;
      border-bottom: 1px dotted #dbdbdb;
      // text-align:center;

      .inner-table {
        margin: -8px -5px;
      }
    }

    tr:last-child {
      td {
        // border-bottom:none;
      }
    }
  }
  &-footer {
    margin-top: 12px;
    .clearfix();

    .x-page-info {
      float: left;
      font-size: 14px;
      line-height: @grid-footer-height;
    }
    .x-page {
      float: right;
    }
  }
  &-loading {
    position: relative;
  }
  &-reload {
    position: absolute;
    top: 5px;
    right: 3px;
    z-index: 1;
  }
  &-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  &-selection-col {
    width: 42px;
  }
  &-selection-column {
    text-align: center;
  }

  table {
    width: 100%;
    table-layout: fixed;

    input[type='checkbox'],
    input[type='radio'] {
      margin: 0;
      vertical-align: middle;
    }
    select {
      width: 100%;
      padding-top: 3px;
      padding-bottom: 3px;

      &.x-auto-width {
        width: auto;
      }
      & + .btn-text,
      & + .btn-label {
        margin-right: 0;
      }
    }

    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    .btn-text {
      margin: 0 7px;
      color: @blue;
      cursor: pointer;
      .fa,
      i {
        margin-right: 3px;
      }
    }
  }

  &-inner {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  table tbody tr:hover {
    color: #1b9200;
    background-color: #e2ff97;
    background-color: #fefbe0;
  }

  &-row-selected,
  table tr&-row-selected,
  table tr&-row-selected:hover,
  table tr&-row-selected tr,
  table tr&-row-selected tr:hover {
    color: #1b9200;
    background-color: #e4f5ff !important;
  }
}

.@{table-prefix-cls}-apply {
  .@{table-prefix-cls}-header,
  .@{table-prefix-cls}-body {
    table tr {
      background: none;
      &.@{table-prefix-cls}-row-selected {
        background-color: #e4f5ff;
      }
    }
    th,
    td {
      position: relative;
      border: 1px dotted #dbdbdb;
    }
    th {
      height: @grid-header-height;
    }

    td {
      overflow: hidden;
    }

    tr:first-child th,
    tr:first-child td {
      border-top: none;
    }
    tr:last-child th,
    tr:last-child td {
      border-bottom: none;
    }
    tr th:first-child,
    tr td:first-child {
      border-left: none;
    }
    tr th:last-child,
    tr td:last-child {
      border-right: none;
    }

    .inner-table {
      tr {
        th,
        td {
          font-size: 12px;
          border: 1px dotted #dbdbdb;
        }
      }
      th {
        height: @grid-header-height;
      }
      td {
        // height:auto;
      }
      tr:first-child th,
      tr:first-child td {
        border-top: none;
      }
      tr:last-child th,
      tr:last-child td {
        border-bottom: none;
      }
      tr th:first-child,
      tr td:first-child {
        border-left: none;
      }
      tr th:last-child,
      tr td:last-child {
        border-right: none;
      }

      &.table-layout {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;

        .table-layout-body,
        table {
          height: 100%;
        }
      }
    }
  }
  .@{table-prefix-cls}-header {
    table tr,
    table tr:hover {
      color: #666666;
      background: none;
    }
  }
}

.x-page {
  &-first,
  &-prev,
  &-item,
  &-jump-prev,
  &-jump-next,
  &-next,
  &-last,
  &-btn {
    display: inline-block;
    height: 27px;
    margin-top: unit((unit(@grid-footer-height) - 26)/2, px);
    margin-left: 5px;
    padding: 0 10px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    font-size: 14px;
    // line-height: 27px;
    vertical-align: middle;
    color: #666666;
    outline: none;
    background-color: #e7e7e7;
    background: -webkit-linear-gradient(top, #f9f9f9 0, #e7e7e7 100%);
    background: -moz-linear-gradient(top, #f9f9f9 0, #e7e7e7 100%);
    background: -o-linear-gradient(top, #f9f9f9 0, #e7e7e7 100%);
    background: linear-gradient(to bottom, #f9f9f9 0, #e7e7e7 100%);
    background-repeat: repeat-x;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    cursor: pointer;

    i, .fa {
      line-height: 27px;
    }
    svg {
      vertical-align: top;
      margin-top: 7px;
    }
  }
  &-disabled,
  &[disabled] {
    color: #cdcdcd;
    background: #eeeeee;
    cursor: default;
  }
  &-options,
  &-simple-pager {
    display: inline-block;
    vertical-align: middle;
  }
  &-simple-pager {
    input[type='text'] {
      height: 27px;
      margin-top: unit((unit(@grid-footer-height) - 26)/2, px);
      margin-left: 5px;
      border: 1px solid #dfdfdf;
      vertical-align: middle;
    }
    input[type='text'] {
      width: 42px;
      padding: 4px 3px;
      border-radius: 3px;
      box-shadow: 0 0 3px rgba(0, 0, 0, 0.1) inset;
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
    * {
      // vertical-align: middle;
    }
  }
  &-simple-pager &-btn {
    margin-left: -1px;
  }
  &-first,
  &-prev,
  &-jump-prev,
  &-jump-next,
  &-next,
  &-last,
  &-btn {
    padding: 0 7px;
    font-size: 12px;
  }
}

.x-fixed {
  .@{table-prefix-cls} {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    &-header,
    &-footer,
    &-content,
    &-body,
    &-placeholder {
      position: absolute;
      left: 0;
      right: 0;
    }
    &-header,
    &-content,
    &-body,
    &-placeholder {
      top: 0;
    }
    &-header {
      margin-bottom: 0 !important;
    }
    &-footer,
    &-body,
    &-placeholder {
      bottom: 0;
    }
    &-footer {
      margin-top: 0;
    }
    &-content {
      bottom: unit(unit(@grid-footer-height) + unit(@x-margin), px);
    }
    &-body,
    &-placeholder {
      top: @grid-header-height;
    }
    &-body {
      min-height: 0;
      background-color: #ffffff;
      overflow: auto !important;

      tr {
        &:last-child {
          td {
            border-bottom: 1px dotted #dbdbdb;
          }
        }
      }
    }
    &-no-header {
      .@{table-prefix-cls}-body,
      .@{table-prefix-cls}-placeholder {
        top: 0;
      }
    }
    &-no-pagination {
      .@{table-prefix-cls}-content {
        bottom: 0;
      }
    }
  }
}
